This invention relates generally to the field of computer graphics simulation and more particularly to MIP mapping an index texture in a computer graphics simulation system.
Many computer graphics systems have a type of texture called index texture. An index texture map contains an index or pointer in each texel instead of the more typical red-green-blue (RGB) or intensity texel value. The index stored in the texel points to an entry in a look-up table of color values or gray scale values stored in the image generator""s memory. The value from the table is then used in rendering the texture. FIG. 1 shows a graphic representation of the use of an index texture. A texture map 20 is shown and that texture map is then mapped onto a polygon 22. Since the texture map 20 on the polygon 22 initially contains only indexes, these indexes 23 must be correlated to the intensity lookup table 24 or color lookup table. This provides intensity and texture to the final polygon 26.
The advantage of using index texture is that the look-up table can be dynamically updated by the image generator, which results in constantly changing texture without rebuilding the texture maps for the polygons. The disadvantage of index texture is that the look-up table is usually quite limited in its length which limits the possible color or intensity values that can be used in the texture.
Index textures are very useful for the computer simulation of various sensors used on aircraft, tanks and other weapon systems. The typical application is for infrared sensors or perhaps night-vision goggles. For example, in the infrared application of index texture, the index stored in each texel of a map represents a material. An index of 4 may indicate a wood color stored in the color table. So, a texel that had a 4 as its index would represent wood. During real-time simulation, the image generation software computes the appropriate gray value for wood given the current simulated environmental conditions. This gray value will be loaded into the look-up table. When the wood texel is processed, the index value of 4 is substituted with the gray value so that as the texel is rendered, it looks as it should for wood.
A standard list of materials used by computer graphics modelers has been developed for various infrared (IR) simulations. The preferred embodiment of this list contains thirty-nine typical materials and a very long list of not-so-common materials. These uncommon materials are often referred to as exotic materials. The modelers do not use these exotic materials unless a special application, which has been well planned for, requires them. Each material typically has six attributes that define the physical properties necessary for computing its gray value which simulates infrared for the current environmental conditions. Of course, it should be realized that the number of properties defined in the table is only limited by the number of properties desired to be modeled. Table 1 shows thirty-nine common materials with their associated physical properties and values.
To aid in the understanding of Table 1 each property will be defined briefly below.
1. Emissivity, xcex5, (e.g. infrared), is the long wavelength thermal emissivity for a material. In other words, emissivity is the proportion of the total energy emitted from the material that is in the long wavelength band.
2. Absorption, xcex1, (no units), is the absorptance for solar radiation for the material. This represents the proportion of the solar radiation hitting the material that is absorbed.
3. Conductivity, k, (W mxe2x88x92xc2x0 C.), is the thermal conductivity of the material.
4. The diurnal depth, d, (meters), of a material is the thickness of the material that participates in the daily heat exchange. If the typical thickness of a material is greater than the diurnal depth, then we really only need to use the diurnal depth for the thickness of the material. If the typical thickness of the material is less than the diurnal depth, then we should use the thickness. The material table contains the smaller of the diurnal depth or typical thickness, which will be used for calculations.
5. Specific heat, c (J kgxe2x88x921Kxe2x88x921).
6. Density, xcfx81, (kg mxe2x88x923).
It appears to be a straight forward problem to create a texture map where each texel represents a material. However, it actually turns out to be quite difficult to do in practical applications. Most of the texture maps in simulation systems are derived from full-color photographs. The problem then becomes one of inferring from each pixel in the photograph what material is shown and then assigning the appropriate index.
After the initial assigning of material types to each texel, the problem is how to MIP the texture map. Mipping involves creating lower-resolution maps representing the same information. A MIP map is a prefiltered image of the original texture which is created to avoid aliasing in the simulated image. FIG. 2 shows the basic idea of mipping. The goal of mipping a texture map is that fewer texels have to be processed in real-time and the MIP maps are generated and stored in advance for use at run-time. The ideal texture map size is to have about one texel for every pixel. If the perspective size of a texture map gets too small and there are to many texels per pixel, aliasing is produced in the final picture. That is where the lower MIP map levels come in. There are fewer pixels in the lower MIP levels and thus there are fewer texels per pixel. To make the image look good, the lower MIP levels should look just the same as the higher MIP levels when displayed over the same number of pixels.
In typical texture map mipping, the values of adjacent texels are averaged together to determine the value of the texel at the lower MIP level. This works well for an RGB or intensity map, but it does not make sense to use this method for index texture maps. What does it mean to average the indexes of 1, 6, 4, and 27? The average of the material index entries in the lookup table do not necessarily yield the color found at the index of 9.5! Further, it cannot be assumed that the color or gray scale changes across the lookup table will be linear. This is especially true where infrared is being simulated. Since the index in each texel represents a material, what does it mean to average steel-bare, vinyl siding, wood, and ground-cover? An index of 9 would be shingle-asphalt and 10 would be plastic. Thus, there is no logical or physical world correlation. Averaging the indexes of an index texture does not provide an accurate value for a material used in the MIP map. This problem is increased when the index textures are used in an infrared simulation system to simulate infrared instruments. This is because the infrared simulation should show a simulated picture of the infrared radiation emitted from an object. Therefore, averaging together the color value does not simulate the actual properties of the objects which generate the infrared radiation.
Accordingly, it would be an advancement over the state of the art in computer graphics simulation to provide a device and method for effectively MIP mapping an index texture map for use with sensor simulation (e. g. , infrared, or night-vision goggles).
It is an object of the present invention to provide a method for MIP mapping index textures.
It is another object of the present invention to provide a method for MIP mapping index textures using a look-up table containing material properties.
It is another object of the present invention to provide a method for MIP mapping index textures using a look-up table containing material properties and several material characteristics combined into a function.
It is yet another object of the present invention to provide a method for MIP mapping index texture used in an infrared simulation system.
The presently preferred embodiment of the invention is a method for MIP mapping index texture. The index texture has texel index values which refer to physical material properties. The first step of the method is storing a lookup table, having table entries defining material types, wherein each table entry has an index, and material property type values. Then at least two texels are selected from the index texture, where each texel has index values corresponding to table entries. Next the material property type values are averaged for each separate property type from the table entries for selected texels. This produces an average material property value for each material property type. Another step is selecting a new material index based on the material which most closely matches the average material property values. The final step is generating the next lowest MIP level by using the new material indexes to form a new index texture with fewer texels.